﻿#ifndef MEDIADECODE_H
#define MEDIADECODE_H

#include <QObject>

extern "C"{
#include <libavformat/avformat.h>
}

class mediaDecodePrivate;
class ioQueue;

class mediaDecode : public QObject
{
    Q_OBJECT
public:
    explicit mediaDecode(QObject *parent = 0);
	~mediaDecode();

    void setIOQueue(ioQueue* queue);
    void setFormat(AVFormatContext* format);
    bool startDecode();
    void stopDecode();

private:
    bool openDecoder();
    bool createDecodThread(AVCodecContext *cc, int streamIndex);

signals:

public slots:

private:
    mediaDecodePrivate *d;
};

#endif // MEDIADECODE_H
